import request from '@/utils/request'

// 查询文物列表
export function listCulturalRelic(query) {
  return request({
    url: '/index/culturalRelic/list',
    method: 'get',
    params: query
  })
}

// 查询文物详细
export function getCulturalRelic(id) {
  return request({
    url: '/index/culturalRelic/' + id,
    method: 'get'
  })
}

// 新增文物
export function addCulturalRelic(data) {
  return request({
    url: '/index/culturalRelic',
    method: 'post',
    data: data
  })
}

// 修改文物
export function updateCulturalRelic(data) {
  return request({
    url: '/index/culturalRelic',
    method: 'put',
    data: data
  })
}

// 删除文物
export function delCulturalRelic(id) {
  return request({
    url: '/index/culturalRelic/' + id,
    method: 'delete'
  })
}
